﻿using QMERP.SeedWork;

namespace QMERP.Domain.Entities
{
    /// <summary>
    /// 出入库记录
    /// </summary>
    public partial class StockActionLog : FullEntity<long>
    {
        public StockActionLog()
        {
            StockActionLogDetails = new HashSet<StockActionLogDetail>();
        }
        /// <summary>
        /// 库存操作类型(出库或入库)
        /// </summary>
        public string StockActionType { get; set; } = "";
        /// <summary>
        /// 业务单Id
        /// </summary>
        public long BusinessOrderId { get; set; }
        /// <summary>
        /// 业务单编号
        /// </summary>
        public string BusinessOrderNumber { get; set; } = "";
        /// <summary>
        /// 业务单明细Id
        /// </summary>
        public long BusinessOrderDetailId { get; set; }
        /// <summary>
        /// 业务类型
        /// </summary>
        public string BusinessType { get; set; } = "";

        /// <summary>
        /// 仓库Id
        /// </summary>
        public long WarehouseId { get; set; }
        /// <summary>
        /// 镜种Id
        /// </summary>
        public long LensId { get; set; }

        /// <summary>
        /// 仓库
        /// </summary>
        public virtual Warehouse? Warehouse { get; set; }
        /// <summary>
        /// 镜种
        /// </summary>
        public virtual Lens? Lens { get; set; }
        /// <summary>
        /// 出入库记录详情列表
        /// </summary>
        public virtual ICollection<StockActionLogDetail> StockActionLogDetails { get; set; }
    }
}
